<template>
<h3>这是parent.vue</h3>
<child :title=parenttitle :day=parentnumber
:object=parentobject :array=parentarray
@someEvent="getHandle" @childEvent="getHandle1"
v-model="parentValue"><h3>这是父组件h3代码</h3></child>
<p>message:{{message}}</p>
</template>
<style>
</style>
<script>
import child from '@/components/child.vue'
const myValue='这是一个value'
export default{
    data(){
        return{
            parenttitle:"动态传递父组件的数据",
            parentnumber:100,
            parentobject:{key:myValue},
            parentarray:[1,2,3,4,5],
            message:"",
            parentValue:""
        }
    },
    components:{
        child
    },
    methods:{
    getHandle(){
            console.log("触发了");
            //编写其他方法体
        }
        ,
        getHandle1(data){
            this.message=data;
            //编写其他方法体
        }
    }
}
</script>